const { ccclass } = cc._decorator;

/** 适配全屏类背景图 等比缩放手机屏幕大小 */
@ccclass
export default class AdapItem extends cc.Component {
    start() {
        let normalSize = cc.view.getDesignResolutionSize();
        let widthScale = cc.winSize.width / normalSize.width;
        cc.log("fitWidth", widthScale)
        let heightScale = cc.winSize.height / normalSize.height;
        cc.log("fitHeight", heightScale)
        this.node.scale = Math.max(widthScale, heightScale);
    };
}